<!DOCTYPE html>
<html class="${bg!}">

@/**
@ * 本页面所用的模板变量
@ *
@ * title : 页面的标题
@ * layoutContent : 主页面的html内容
@ * js : 业务所需要的js，为数组
@ * css : 业务所需要的css，为数组
@ * bg : 背景颜色
@ * plugins : 需要用到的插件，目前有["ztree"]
@ **/

<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>${title!"管理系统"}</title>
    <link rel="stylesheet" href="${ctxPath}/assets/common/layui/css/layui.css"/>
    <link rel="stylesheet" href="${ctxPath}/assets/common/module/admin.css" media="all"/>

    <link rel="stylesheet" href="${ctxPath}/assets/common/bootstrap/css/bootstrap v3.4.1.css">
    <link rel="stylesheet" href="${ctxPath}/assets/common/bootstrap/css/fontawesome.css">

    <style>

    </style>
    <!--其他插件css-->
    @if(isNotEmpty(plugins)){
    @if(array.contain(plugins,"ztree")){
    <link href="${ctxPath}/assets/common/plugins/ztree/zTreeStyle.css" rel="stylesheet" type="text/css"/>
    @}
    @}

    @/* 其他业务用的css */
    @if(isNotEmpty(css)){
    @for(item in css){
    @if(strutil.startWith(item,"/")){
    @item = ctxPath + item;
    @}
    <link href="${item}" rel="stylesheet" type="text/css"/>
    @}
    @}
</head>

<body>

@/* 页面加载loading */
@ include("/common/loading.html"){}

@/* 正文 */
${layoutContent}

@/* 加入contextPath属性和session超时的配置 */
<script type="text/javascript">
    var Feng = {
        ctxPath: "",
        addCtx: function (ctx) {
            if (this.ctxPath === "") {
                this.ctxPath = ctx;
            }
        }
    };
    Feng.addCtx("${ctxPath}");

    var Katrina = {
        getVisitStatus: function (visitStatus) {
            if (visitStatus === 1) {
                return "进行中"
            } else if (visitStatus === 2) {
                return "完成"
            }
        },
        getStatus: function (status) {
            if (status === 0) {
                return "创建";
            } else if (status === 1) {
                return "执行中";
            } else {
                return "已完成";
            }
        },
        formatDateTime: function (date) {
            var y = date.getFullYear();
            var m = date.getMonth() + 1;
            m = m < 10 ? ('0' + m) : m;
            var d = date.getDate();
            d = d < 10 ? ('0' + d) : d;
            var h = date.getHours();
            var minute = date.getMinutes();
            minute = minute < 10 ? ('0' + minute) : minute;
            return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
        }
    }
</script>

@/* js和业务用的js数组 */
<script type="text/javascript" src="${ctxPath}/assets/common/layui/layui.js"></script>
<script type="text/javascript" src="${ctxPath}/assets/common/js/common.js"></script>

<!--其他插件js-->
@if(isNotEmpty(plugins)){
@if(array.contain(plugins,"ztree")){
<script src="${ctxPath}/assets/common/plugins/jquery/jquery-3.2.1.min.js"></script>
<script src="${ctxPath}/assets/common/plugins/ztree/jquery.ztree.all.min.js"></script>
@}
@}

<script src="${ctxPath}/assets/common/bootstrap/js/jquery-1.11.0.min.js"></script>
<script src="${ctxPath}/assets/common/bootstrap/js/bootstable.js"></script>
<script src="${ctxPath}/assets/common/bootstrap/js/bootstrap-suggest.min.js"></script>


@if(isNotEmpty(js)){
@for(item in js){
@if(strutil.startWith(item,"/")){
@item = ctxPath + item;
@}
<script src="${item}"></script>
@}
@}
</body>
</html>